The present invention relates to enabling the execution environment of an interpreter, such as a virtual machine, to be made secure in a data-processing device of the portable electronic type, such as a smart card.
More particularly the invention relates to providing protection from attacks for executing items of data as if they were instructions (opcodes). A typical attack consists, for example, in executing an undesired jump to a memory zone that has recorded items of data. That results, for example, in pseudo-codes in a downloaded application, such as an applet, being modified by an attacker in order to insert an “aggressive” applet into a data field and thus to insert a jump towards that portion of data. The virtual machine, which is not capable of distinguishing between instructions and data, then executes the items of data as if they were instructions.